Automated testing of gui mirroring

ABSTRACT

Testing correct mirroring of a GUI. Two GUI specifications are received, a reference GUI specification and a mirrored GUI specification that corresponds to a horizontally mirrored version of the reference GUI specification. For each child element in the reference GUI specification, a start position, width, and width of the parent GUI element are determined from the reference GUI specification; for the corresponding mirrored GUI element, a mirrored start position and a mirrored width are determined from the mirrored GUI specification; and for the mirrored GUI element, a calculated mirrored start position, based on the start position, width, and width of the child GUI element&#39;s parent GUI element are determined. If the mirrored start position or the mirrored width is not within a predefined tolerance of the calculated mirrored start position or the width, respectively, the mirrored GUI specification is updated with the calculated mirrored start position or the width, respectively.

BACKGROUND

The present invention relates generally to the field of graphical userinterface (GUI) development, and more particularly to computer-automatedtesting of GUI mirroring.

GUIs support a variety of natural languages in order to target usersfrom around the globe. Supporting different languages requires that aGUI display a language in its normal direction flow. For example,English and French are read from left to right (LTR), while Arabic,Hebrew, and Persian are read from right to left (RTL). User conveniencedictates that the layout of a GUI for an RTL language be mirrored withrespect to the corresponding LTR layout. GUI mirroring generallyinvolves reflecting the position of GUI elements about a vertical axispassing through the center of the screen. Nested GUI elements will besimilarly reflected relative to their containing elements. In addition,the direction flow of text elements may be switched, based on whetherthe language is LTR or RTL.

GUI elements are those elements used by GUIs to visually representinformation stored in a computer. These generally facilitate the use ofcomputer software. Examples of GUI elements are windows, for example,folder windows and message windows; and control elements, or widgets,which facilitate specific user-computer interactions, such as buttons,menus, and text boxes.

To ensure that mirroring is implemented correctly, such implementationsare generally tested manually. A human tester may preview a mirrored GUIto check the correct placement of GUI elements and report if any areincorrect. Such manual efforts, which need to be redone each time achange to the GUI design occurs, tend to be time consuming andsubjective—small deviations from the correct positions may be easilymissed by the naked eye. Moreover, certain device characteristics maycause a GUI to appear different when mirrored on different displaydevices.

SUMMARY

Embodiments of the present invention disclose a computer-implementedmethod, computer program product, and system for testing correctmirroring of a GUI. A first GUI specification and a second GUIspecification are received. One is designated as a reference GUI and theother is designated as a mirrored GUI specification that corresponds toa horizontally mirrored version of the reference GUI specification. Foreach child element in the reference GUI specification, a start position,width, and width of the parent GUI element are determined from thereference GUI specification; for the corresponding mirrored GUI element,a mirrored start position and a mirrored width are determined from themirrored GUI specification; and for the mirrored GUI element, acalculated mirrored start position, based on the start position, thewidth, and the width of the child GUI element's parent GUI element aredetermined. If the mirrored start position or the mirrored width is notwithin a predefined tolerance of the calculated mirrored start positionor the width, respectively, the mirrored GUI specification is updatedwith the calculated mirrored start position or the width, respectively.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram of a GUI mirroring testing (GMT)system, in accordance with an embodiment of the present invention.

FIGS. 2, 3, and 4 illustrate various aspects of correct and incorrectGUI mirroring.

FIG. 5 is a flowchart depicting operational steps of a GMT program, inaccordance with an embodiment of the present invention.

FIG. 6 is a functional block diagram of a data processing environment,in accordance with an embodiment of the present invention.

FIG. 7 is a functional block diagram of a cloud computing node accordingto an embodiment of the present invention.

FIG. 8 depicts a cloud computing environment according to an embodimentof the present invention.

FIG. 9 depicts abstraction model layers according to an embodiment ofthe present invention.

DETAILED DESCRIPTION

Embodiments of the present invention are generally directed to automatedGUI mirroring testing (GMT) systems that process layout information fora reference GUI and a corresponding version that is mirrored, or flippedhorizontally, to determine whether the positions of mirrored GUIelements, as shown in a display device, will be correct. The positionsof mirrored GUI elements are considered to be correct if they satisfycertain positional relationships based on their dimensions andlocations. The relationships verify, for example, that GUI elementplacement will be correct for a language flow direction that is oppositeto that of the reference GUI. This enables an automated, accurate, andefficient method for testing GUI mirroring.

For ease of explanation, an exemplary embodiment is described below inwhich the reference GUI corresponds to an LTR language and the mirroredGUI corresponds to an RTL language. That is, the reference language isLTR and the mirrored language is RTL. It will be apparent to thoseskilled in the art that the concepts described in relationship to theexemplary embodiment may be applied to embodiments in which thereference GUI is an RTL GUI and the mirrored GUI is an LTR GUI.

Various markup language related trademarks are used throughout thisspecification. With respect to their use herein, all trademarks andregistered trademarks are the property of their respective owners.

Hypertext Markup Language (HTML) is a text-based markup languagecommonly used to create web pages. Web browsers can read HTML files andrender them into visually displayed web pages. HTML5 is the latestrevision of the World Wide Web Consortium's (W3C's) HTML standard.

Extensible Markup Language (XML) is a text-based markup language thatdefines a set of rules for encoding electronic documents in a formatwhich is both human readable and machine readable. It is defined by theW3C's XML 1.0 Specification and by several other related specifications.XML is similar to HTML, however XML was designed primarily to describedata, while HTML was designed to display data.

Extensible Hypertext Markup Language (XHTML) is HTML written accordingto the stricter rules of XML. As such, XHTML may be parsed usingstandard XML parsers. HTML5 includes many of the features of XHTML.

Cascading Style Sheets (CSS) is a text-based style sheet language usedfor describing the look and formatting of a document written in a markuplanguage. While most often used to change the style of web pages anduser interfaces written in HTML and XHTML, the language can be appliedto any kind of XML document, including plain XML and variants of XMLsuch as XUL™, developed and supported by Mozilla® Foundation. Along withHTML and JavaScript™, CSS is a technology used by most websites tocreate web pages, user interfaces for web applications, and userinterfaces for mobile applications. CSS is designed primarily to enablethe separation of document content from document presentation, includingdesign elements such as the layout, colors, and fonts. This separationof content and presentation via CSS is recommended in HTML5.

A desktop application (“desktop app”) is a software program that isgenerally installed on and runs on a desktop computer or laptop. Amobile application (“mobile app”) is one that is typically installed onand runs on a mobile device, such as a mobile phone or tablet. A richInternet application (RIA) is a web application designed to deliverfeatures and functions normally associated with desktop applications;however, an RIA normally runs inside a web browser and usually does notrequire a software installation. RIAs generally split the processingacross the Internet or intranet divide by locating the user interfaceand related activity on the client side, and the data manipulation andoperation on the application server side. HTML5 is designed to work withCSS and JavaScript to facilitate the development of RIAs.

User interfaces for RIAs are often specified similarly to web pages, intext files written in HTML or XHTML, with one or more additional CSSfiles. User interfaces for desktop and mobile apps are generallyspecified in text files written in a user interface markup language(UIML), a markup language for describing and rendering GUIs and theircontrol elements. Many UIMLs are dialects of XML and may be dependent ona pre-existing scripting language engine, usually a JavaScript engine,for rendering controls and extra scripting capabilities. Examples ofXML-based UIMLs are XUL, QML (Qt® Project), XAML (Microsoft®.NETFramework), and FXML (JavaFX from Oracle®). In addition, the layout ofmobile app GUIs for the Android™ platform may be specified in XML.

The W3C Document Object Model (DOM) is a platform and language-neutralinterface, or API, that specifies how programs and scripts, for examplein JavaScript, may dynamically access and manipulate electronicdocuments in HTML and XML. The DOM is a W3C standard. The DOM presentsan XML or HTML document as a tree-structure. The nodes in the DOM treeof an XML or HTML specification of a GUI layout correspond to nested GUIelements. There is generally one root element, which may correspond tothe base window, and multiple child elements, corresponding to controls,or widgets. Typically, each child node has an associated size andposition relative to the base window or to its parent element. Bytraversing the DOM tree, for example using a JavaScript script, thedimensions and positions of GUI elements, as specified, for example, inthe XML specification of the GUI layout, may be ascertained and, ifdesired, modified. An XML parser that supports the XML DOM may also beused to access the elements in a GUI specified via XML.

Tree models other than DOM, such as JDOM and XOM™, may also be used torepresent and provide access to GUI elements specified in an XML file.Moreover, languages such as XPath™ and XQuery may facilitate theextraction of data from XML files.

The size and position of GUI elements may be affected by the form and/orpixel density of the device used to display the GUI. For this reason,layout specifications are usually given in relative, ordisplay-independent, units, rather than absolute units such as mm orpixels. Relative units include dp, or density-independent pixels, forAndroid layouts; px, or device pixel, units in CSS; and gu, or gridunits, in QML. Relative units are generally converted to pixels by theprogram that renders the GUI on the display device. For a GUI layoutspecified in absolute units, it is generally possible to convert theabsolute units to relative units, using characteristics of the displaydevice, such as its size and pixel density.

HTML elements can be considered as boxes. In CSS, the term box model isused when talking about design and layout. The CSS box model isessentially a box that wraps around HTML elements, and it consists ofmargins, borders, padding, and the actual content, all of which mayaffect the displayed dimensions of a GUI element. XML documents are nottypically formatted with CSS. However, XML-based UIMLs formatted withCSS may provide access to the CSS box model. XML-based UIMLs thatsupport a box model include XUL and QML.

As mentioned, GUI mirroring generally consists of reflecting child GUIelements about a vertical axis passing through the center of the parentGUI element. Typically, only the position of GUI elements is mirrored,not the content. For example, photos will not be flipped, although theirorder may be reversed. There may be exceptions—for example, somedirectional icons such as arrows may need to be flipped.

FIG. 1 is a functional block diagram of a GMT system 100, in accordancewith an embodiment of the present invention. GMT system 100 includescomputing device 110, which further includes GMT program 112. Computingdevice 110 represents the computing environment or platform that hostsGMT program 112. In various embodiments, computing device 110 may be alaptop computer, netbook computer, personal computer (PC), a desktopcomputer, or any programmable electronic device capable of hosting GMTprogram 112, in accordance with embodiments of the invention. Computingdevice 110 may include internal and external hardware components, asdepicted and described in further detail below with reference to FIG. 4.In other embodiments, computing device 110 may represent a cloudcomputing environment, as described in relation to FIGS. 7, 8, and 9,below.

In an exemplary embodiment of the invention, GMT program 112 operatesgenerally to receive GUI specifications, or layout files, for both LTRand RTL directions, parse these files to access the GUI elements, anddetermine whether the positions of RTL GUI elements are correct relativeto the corresponding LTR GUI elements. A layout file is generally a textfile written in HTML, XHTML, or an XML-based UIML and may reference oneor more CSS files. GMT program 112 may include parsing module 114,layout mirroring module 116, and report generation module 118.

Parsing module 114 may receive layout files for both LTR and RTLdirections and may initiate the GUI mirroring testing process byestablishing a reference direction, for example LTR, and a mirroreddirection, for example RTL. This determination may be based, forexample, on user input or on the order in which the layout files arereceived. Alternatively, parsing module 114 may establish the referencedirection by querying the text direction property in the DOM for thelayout file, or by automatically detecting whether text elementsspecified in a layout file are predominantly present in an RTL language.This may be done, for example, by comparing samples of text from thetext elements with predefined short strings in the RTL languages ofinterest. In addition, language classification tools, such as the JavaText Categorization Library (JCTL) may be used to guess a referencelanguage and/or a mirrored language.

In an exemplary embodiment of the invention, parsing module 114 operatesto receive an LTR layout file and a corresponding RTL layout file. Forexample, for desktop or mobile apps, parsing module 114 may receivelayout files in XML or an XML-based UIML. For web apps, including RIAs,the layout files may contain HTML alone, or HTML with CSS. Parsingmodule 114 may obtain information from the layout files about LTR GUIelements and their corresponding RTL GUI elements, including positionsand dimensions. For example, for web apps, parsing module 114 may employthe HTML DOM to access GUI elements in a JavaScript script. For desktopand mobile apps, parsing module 114 may employ the XML DOM in aJavaScript script, or a query language such as XQuery, to access GUIelements. GUI elements may be identified by an ID, name, or combinationof both.

In other embodiments, parsing module 114 may obtain GUI elementinformation from the underlying operating system (OS). This mayguarantee that the tested GUI coincides with what a user actually sees,after any processing stages that may occur between parsing anddisplaying. For example, testing tools such as Inspect and AccScope,which are part of the Windows® Automation API, may provide informationfrom the underlying Windows operating system, such as value, position,layout, visual attributes, and event handles for GUI elements, asdisplayed. The provided position and size information may then be usedin GUI mirroring testing.

Layout mirroring module 116 operates generally to receive position anddimension information from parsing module 114 about LTR GUI elements andtheir corresponding RTL GUI elements, and test whether GUI elements arecorrectly mirrored, in accordance with an embodiment of the invention.Testing for correct mirroring includes verifying that each RTL GUIelement has substantially the same width as its LTR counterpart, and itsdisplacement relative to the start point of its parent element issubstantially the same as the displacement of its RTL counterpartrelative to the end point of its parent element. Layout mirroring module116 may begin by testing all child elements contained within the basewindow and, for each GUI element tested, layout mirroring module 116 maytest its child elements, recursively in a tree style, until the leaves,representing the innermost GUI elements, are reached. Testing ends whenall the leaves have been tested.

Layout mirroring module 116 may receive the LTR and RTL GUI elementdimension and position information from parsing module 114 in absoluteor relative units, as described above. In an embodiment of theinvention, if dimensions or positions are in absolute units, layoutmirroring module 116 may convert the absolute units to relative units,based on characteristics of display screen 620 (FIG. 6), such as itssize and pixel density.

In an exemplary embodiment of the invention, layout mirroring module 116may receive positions and dimensions for all LTR GUI elements and theirchild elements from parsing module 114. It is assumed that every GUIelement has a parent element unless it is the top level element,typically the base window. As GUI elements may be nested, a GUI elementmay be a parent element of other GUI elements, as well as a childelement of another GUI element. Associated with each GUI element E is awidth, W, and, for every child element e of E, an x₁-value, or startposition, and a width, w, generally in display-independent units. Foreach GUI element E, layout mirroring module 116 may receive W and, forevery child element e of E, w and x₁. Layout mirroring module 116 maycompute the expected mirrored start position x₁′ for every child elemente using equation (1):

x ₁ ′=W−(x ₁ +w) (1)

For each LTR GUI element, layout mirroring module 116 may additionallyreceive an actual start position rx₁ and width rw for a corresponding,i.e., mirrored, RTL GUI element from parsing module 114. For each childelement e of E, layout mirroring module 116 may compare the expectedstart position x₁′ with the actual start position rx₁ and expected widthw with the actual width rw of the mirrored GUI element. If rx₁=4 andrw=w, the test passes; otherwise it fails. FIG. 2 illustrates thisprocess in reference to a first GUI in view (A) and its mirrored versionin view (B), as described in further detail below.

Layout mirroring module 116 may employ a fault tolerance value, anon-negative value ε such that, for example, the test for a mirrored GUIelement passes if the actual start value, rx₁, lies between x₁′−ε andx₁′+ε:

W−(x ₁ +w)−ε≦rx ₁ ≦W−(x ₁ +w)+ε

and, similarly, the actual width rw lies between w−ε and w+ε. Note thatspecifying ε=0 is equivalent to requiring equality of rx₁ with x₁′ andrw with w. For example, a fault tolerance corresponding to 1-3 pixelwidths may be advantageous if conversion of positions or dimensions ofGUI elements from absolute to relative units may have introducednumerical errors.

In some cases, the OS may cause discrepancies when interpreting RTLlanguage flows. For example, resizing the main window to very small mayresult in mirrored elements in the resized window being misplacedrelative to the original version. By directly using OS information, forexample via a testing tool such as Inspect or AccScope, a comparisonbetween overly small windows in the original and mirrored versions maydetect such misplacements. In an embodiment of the invention, asystematic or random resizing of the tested GUI may be effected in orderto detect incorrect mirroring of GUI elements that may result fromresizing the GUI.

Typically, the GUI will have passed routine GUI testing relative to thereference direction before GUI mirroring testing is done. An apparentdefect in a mirrored GUI is considered a defect only if the GUI elementin question is incorrectly mirrored relative to the reference direction,whether or not the original reference GUI element was correctly placed.

FIG. 2, views (A) and (B) illustrate how the correct placement ofmirrored GUI elements may be tested by layout mirroring module 116, inaccordance with an embodiment of the invention. In view (A), a GUIelement E 210 contains a child element e 212, the Download Resumebutton, with width w=280 units and start position x₁=410 units,representing its placement, for example, relative to the upper leftpoint of the parent element E 210. If E has width W=730 units, then theexpected start position for the mirrored version 216 of e may berx₁=W−(x₁+w)=40 units, as shown in view (B).

FIGS. 2, 3, and 4 show examples of correct and incorrect GUI mirroring.FIG. 2, view (A) shows a GUI 210 in the reference direction, which iscorrectly displayed in the mirrored direction 214 in view (B), asdescribed above. In FIG. 3, view (A), the reference direction 310 iscorrect, but the mirrored direction 312 in view (B) has an error (textbox 314 is misplaced). This is considered a mirroring bug. In FIG. 4,view (A), the reference direction 410 and the mirrored direction 414 inview (B) have analogous errors (text boxes 412 and 416 are displaced bythe same amount). Layout mirroring module 116 may not consider this amirroring error, but rather a GUI implementation bug.

In certain embodiments of the invention, layout mirroring module 116 maycorrect GUI mirroring errors. For example, errors detected by layoutmirroring module 116 in a mirrored GUI may be corrected by using the DOMto update the relevant properties of any incorrect GUI elements. Layoutmirroring module may then also invoke the GUI rendering engine todisplay the updated GUI in real time.

Report generation module 118 operates generally to receive from layoutmirroring module 116 the results from comparing predicted positions withactual positions of mirrored GUI elements and report any discrepancies,in accordance with an embodiment of the invention. Report generationmodule 118 may output, for example, a list indicating the GUI elementsthat successfully passed the mirroring test and another list indicatingthe GUI elements that failed.

FIG. 5 is a flowchart depicting operational steps of GMT program 112, inaccordance with an exemplary embodiment of the invention. GMT program112 may receive GUI specifications for both LTR and RTL versions of aGUI (step 510). Parsing module 114 traverses a tree of all GUI elementsin the LTR and RTL versions and, for each child element, retrieves startpositions and widths of each LTR GUI element (step 512) and itscorresponding RTL GUI element (step 514), as well as the width of theparent GUI element. Layout mirroring module 116 computes an expectedposition for each LTR GUI element (step 516) and compares the expectedposition and width with the actual position and width in the RTL GUI. Ifthe expected and actual positions and widths match, the test passes forthe GUI element; otherwise, it fails (step 518). If the GUI elementfails, layout mirroring module 116 updates the RTL GUI specificationwith the expected position and width (step 520).

FIG. 6 depicts a block diagram 600 of components of a computing device110 (FIG. 1), in accordance with an embodiment of the present invention.It should be appreciated that FIG. 6 provides only an illustration ofone implementation and does not imply any limitations with regard to theenvironments in which different embodiments may be implemented. Manymodifications to the depicted environment may be made.

Computing device 110 may include one or more processors 602, one or morecomputer-readable RAMs 604, one or more computer-readable ROMs 606, oneor more computer readable storage media 608, device drivers 612,read/write drive or interface 614, network adapter or interface 616, allinterconnected over a communications fabric 618. Communications fabric618 may be implemented with any architecture designed for passing dataand/or control information between processors (such as microprocessors,communications and network processors, etc.), system memory, peripheraldevices, and any other hardware components within a system.

One or more operating systems 610, and one or more application programs628, for example GMT program 112 (FIG. 1), are stored on one or more ofthe computer readable storage media 608 for execution by one or more ofthe processors 602 via one or more of the respective RAMs 604 (whichtypically include cache memory). In the illustrated embodiment, each ofthe computer readable storage media 608 may be a magnetic disk storagedevice of an internal hard drive, CD-ROM, DVD, memory stick, magnetictape, magnetic disk, optical disk, a semiconductor storage device suchas RAM, ROM, EPROM, flash memory or any other computer-readable tangiblestorage device that can store a computer program and digitalinformation.

Computing device 110 may also include a R/W drive or interface 614 toread from and write to one or more portable computer readable storagemedia 626. Application programs 628 on computing device 110 may bestored on one or more of the portable computer readable storage media626, read via the respective R/W drive or interface 614 and loaded intothe respective computer readable storage media 608.

Computing device 110 may also include a network adapter or interface616, such as a TCP/IP adapter card or wireless communication adapter(such as a 4G wireless communication adapter using OFDMA technology).Application programs 628 on computing device 110 may be downloaded tothe computing device from an external computer or external storagedevice via a network (for example, the Internet, a local area network orother wide area network or wireless network) and network adapter orinterface 616. From the network adapter or interface 616, the programsmay be loaded onto computer readable storage media 608. The network maycomprise copper wires, optical fibers, wireless transmission, routers,firewalls, switches, gateway computers and/or edge servers.

Computing device 110 may also include a display screen 620, a keyboardor keypad 622, and a computer mouse or touchpad 624. Device drivers 612interface to display screen 620 for imaging, to keyboard or keypad 622,to computer mouse or touchpad 624, and/or to display screen 620 forpressure sensing of alphanumeric character entry and user selections.The device drivers 612, R/W drive or interface 614 and network adapteror interface 616 may comprise hardware and software (stored on computerreadable storage media 608 and/or ROM 606).

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The programs described herein are identified based upon the applicationfor which they are implemented in a specific embodiment of theinvention. However, it should be appreciated that any particular programnomenclature herein is used merely for convenience, and thus theinvention should not be limited to use solely in any specificapplication identified and/or implied by such nomenclature.

Based on the foregoing, a computer system, method, and computer programproduct have been disclosed. However, numerous modifications andsubstitutions can be made without deviating from the scope of thepresent invention. Therefore, the present invention has been disclosedby way of example and not limitation.

It is understood in advance that although this disclosure includes adetailed description on cloud computing, implementation of the teachingsrecited herein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as Follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as Follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as Follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 5, a schematic of an example of a cloud computingnode is shown. Cloud computing node 10 is only one example of a suitablecloud computing node and is not intended to suggest any limitation as tothe scope of use or functionality of embodiments of the inventiondescribed herein. Regardless, cloud computing node 10 is capable ofbeing implemented and/or performing any of the functionality set forthhereinabove.

In cloud computing node 10 there is a computer system/server 12, whichis operational with numerous other general purpose or special purposecomputing system environments or configurations. Examples of well-knowncomputing systems, environments, and/or configurations that may besuitable for use with computer system/server 12 include, but are notlimited to, personal computer systems, server computer systems, thinclients, thick clients, hand-held or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 12 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 12 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 5, computer system/server 12 in cloud computing node 10is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 12 may include, but are not limitedto, one or more processors or processing units 16, a system memory 28,and a bus 18 that couples various system components including systemmemory 28 to processor 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnects (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 28 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further depicted and described below,memory 28 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 42 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 12 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing device, a display 24, etc.;one or more devices that enable a user to interact with computersystem/server 12; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 12 to communicate with one or moreother computing devices. Such communication can occur via Input/Output(I/O) interfaces 22. Still yet, computer system/server 12 cancommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 20. As depicted, network adapter 20communicates with the other components of computer system/server 12 viabus 18. It should be understood that although not shown, other hardwareand/or software components could be used in conjunction with computersystem/server 12. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

Referring now to FIG. 6, illustrative cloud computing environment 50 isdepicted. As shown, cloud computing environment 50 comprises one or morecloud computing nodes 10 with which local computing devices used bycloud consumers, such as, for example, personal digital assistant (PDA)or cellular telephone 54A, desktop computer 54B, laptop computer 54C,and/or automobile computer system 54N may communicate. Nodes 10 maycommunicate with one another. They may be grouped (not shown) physicallyor virtually, in one or more networks, such as Private, Community,Public, or Hybrid clouds as described hereinabove, or a combinationthereof. This allows cloud computing environment 50 to offerinfrastructure, platforms and/or software as services for which a cloudconsumer does not need to maintain resources on a local computingdevice. It is understood that the types of computing devices 54A-N shownin FIG. 6 are intended to be illustrative only and that computing nodes10 and cloud computing environment 50 can communicate with any type ofcomputerized device over any type of network and/or network addressableconnection (e.g., using a web browser).

Referring now to FIG. 7, a set of functional abstraction layers providedby cloud computing environment 50 (FIG. 6) is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 7 are intended to be illustrative only and embodiments of theinvention are not limited thereto. As depicted, the following layers andcorresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include: mainframes 61; RISC(Reduced Instruction Set Computer) architecture based servers 62;servers 63; blade servers 64; storage devices 65; and networks andnetworking components 66. In some embodiments, software componentsinclude network application server software 67 and database software 68.

Virtualization layer 70 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers71; virtual storage 72; virtual networks 73, including virtual privatenetworks; virtual applications and operating systems 74; and virtualclients 75.

In one example, management layer 80 may provide the functions describedbelow. Resource provisioning 81 provides dynamic procurement ofcomputing resources and other resources that are utilized to performtasks within the cloud computing environment. Metering and Pricing 82provide cost tracking as resources are utilized within the cloudcomputing environment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal 83 provides access to the cloud computing environment forconsumers and system administrators. Service level management 84provides cloud computing resource allocation and management such thatrequired service levels are met. Service Level Agreement (SLA) planningand fulfillment 85 provide pre-arrangement for, and procurement of,cloud computing resources for which a future requirement is anticipatedin accordance with an SLA.

Workloads layer 90 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation 91; software development and lifecycle management 92; virtualclassroom education delivery 93; data analytics processing 94;transaction processing 95; and GMT program 96.

The foregoing description of various embodiments of the presentinvention has been presented for purposes of illustration anddescription. It is not intended to be exhaustive nor to limit theinvention to the precise form disclosed. Many modifications andvariations are possible. Such modification and variations that may beapparent to a person skilled in the art of the invention are intended tobe included within the scope of the invention as defined by theaccompanying claims.

1. A computer-implemented method for testing correct mirroring of agraphical user interface (GUI), the method comprising: receiving, by acomputer, a first GUI specification in a user interface markup language,which includes at least one child GUI element and its parent GUIelement, wherein the first GUI specification specifies text elementsthat are in a left-to-right natural language and which corresponds to ahorizontally mirrored counterpart of the first GUI specification, andwherein the second GUI specification is provided in display-independentunits; receiving, by a computer, a second GUI specification in a userinterface markup language, which includes a counterpart for each GUIelement in the first GUI specification, wherein the second GUIspecification specifies text elements that are in a right-to-leftnatural language and which corresponds to a horizontally mirroredcounterpart of the first GUI specification, and wherein the second GUIspecification is provided in display-independent units; for each childGUI element in the first GUI specification: determining, by thecomputer, from the first GUI specification, a start position, a width,and a width of its parent GUI element; determining, by the computer,from the second GUI specification, a start position and a width for thecounterpart of the child GUI element; calculating, by the computer, forthe child GUI element, a horizontally mirrored start position, based onits start position, width, and the width of its parent GUI element;determining, by the computer, if the start position and width of thecounterpart child GUI element are within a predefined tolerance of thecalculated horizontally mirrored start position and the width,respectively, of the child GUI element; and in response to determining,by the computer, that the start position or the width of the counterpartchild GUI element is not within a predefined tolerance of the calculatedhorizontally mirrored start position or the width, respectively, of thechild GUI element, updating the second GUI specification with thecalculated horizontally mirrored start position or the width,respectively, of the child GUI element; rendering, by the computer, on adisplay device, a horizontally mirrored GUI, according to the second GUIspecification; in response to determining, by the computer, that thecalculated horizontally mirrored start position or the width of anychild GUI element is not within the predefined tolerance of the startposition or the width, respectively, of the counterpart child GUIelement, updating the rendered horizontally mirrored GUI, according tothe updated second GUI specification; and outputting, by the computer, areport that indicates, for each child GUI element in the first GUIspecification, whether the start position and the width of thecounterpart child GUI element are within the predefined tolerance of thecalculated horizontally mirrored start position and the width,respectively.